package com.schpro.webexperiment.control;

import com.schpro.webexperiment.model.Result;
import com.schpro.webexperiment.service.ExeService;
import com.schpro.webexperiment.util.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author lss
 * @date 2019-02-27, Wed
 */
@RestController
@RequestMapping("/api/exp")
public class ExeController {

  @Autowired
  private ExeService exeService;

  @RequestMapping("/getAll")
  public Result getAllExes() {
    return ResultUtils.newSuccessfulResult(exeService.getAllExercises());
  }

}
